package com.util;

import java.io.File;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

public class Utils {

	public static void lerArquivo(String dirFile) {
		File file = new File(dirFile);
		try {
			Scanner arq = new Scanner(file);
			while (arq.hasNextLine()) {
				String linha = arq.nextLine();
				System.out.println(linha);
			}
			arq.close();
		} catch (IOException ioe) {
			ioe.printStackTrace();
		}
	}
	
	public static Date stringToDate(String data) {
		String formato = "dd/MM/yyyyHH:mm:ss";  
		Date date = new Date();
		try {
			date = new SimpleDateFormat(formato).parse(data);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return date;
	}
}
